<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <title>dom节点</title>
   </head>
   <body>
      <ul>
         <li>1</li>
         <li>2</li>
         <li>3</li>
         <li>4</li>
         <li>5</li>
      </ul>

      <script>
         // const son = document.querySelector('.son')
         // console.log(son.parentNode)
         // const father = document.querySelector('ul')
         // console.log(father.children)
         // console.log(father.childNodes)
         const li2 = document.querySelector('li:nth-child(2)')
         console.log(li2.previousElementSibling)
         console.log(li2.nextElementSibling)

      </script>
   </body>
</html>